<html>
<head>
<title>Using Indeterminate Mode</title>
<link rel="stylesheet" type="text/css" href="../media/style.css">
</head>
<body>

<table border="0" cellspacing="0" cellpadding="0" height="48" width="100%">
  <tr>
    <td class="header_top">HTML_Progress</td>
  </tr>
  <tr><td class="header_line"><img src="../media/empty.png" width="1" height="1" border="0" alt=""  /></td></tr>
  <tr>
    <td class="header_menu">
  		  [ <a href="../classtrees_HTML_Progress.html" class="menu">class tree: HTML_Progress</a> ]
		  [ <a href="../elementindex_HTML_Progress.html" class="menu">index: HTML_Progress</a> ]
		  [ <a href="../elementindex.html" class="menu">all elements</a> ]
    </td>
  </tr>
  <tr><td class="header_line"><img src="../media/empty.png" width="1" height="1" border="0" alt=""  /></td></tr>
</table>

<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td>
      <table cellpadding="10" cellspacing="0" width="100%" border="0"><tr><td valign="top">

<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="10%" align="left" valign="bottom"><a href=
"../HTML_Progress/tutorial_part2-errorhandling.pkg.html">Prev</a></td>
<td width="80%" align="center" valign="bottom"></td>
<td width="10%" align="right" valign="bottom"><a href=
"../HTML_Progress/tutorial_part2-observer.pkg.html">Next</a></td>
</tr>
</table>
<div><a name=""></a><div class="ref-title-box"><div class="ref-title">Using Indeterminate Mode</div>
  <div class="ref-purpose">how to animate a progress bar to show unknown length-task activity</div></div>

 <h1 align="center">Table of Contents</h1>
<ul>

<a href="../HTML_Progress/tutorial_part2-indeterminate.pkg.html#intro">Introduction</a><br />

<a href="../HTML_Progress/tutorial_part2-indeterminate.pkg.html#basic-indeterminate">Using Indeterminate Mode without Progress Monitor</a><br />

<a href="../HTML_Progress/tutorial_part2-indeterminate.pkg.html#monitor-indeterminate">Using Indeterminate Mode with Progress Monitor</a><br />
</ul>


 <span><a name="intro"></a><h2 class="title">Introduction</h2><p>Sometimes you can't immediately determine the length of a long-running task, 
    or the task might stay stuck at the same state of completion for a long time.
    You can show work without measurable progress by putting the progress bar in 
    indeterminate mode. A progress bar in indeterminate mode displays animation 
    to indicate that work is occurring. As soon as the progress bar can display 
    more meaningful information, you should switch it back into its default, 
    determinate mode.<br /></p></span>

 <span><a name="basic-indeterminate"></a><h2 class="title">Using Indeterminate Mode without Progress Monitor</h2><p><p><table class="note"><tr><td><img src="../media/example.png"></td><td><img src = "../media/screenshots/indeterminate_basic.png"/></td></tr></table></p></p>
  <p><div class="listing"><pre><ol><li><span class="src-php">&lt;?php </span></li>
<li><span class="src-inc">require_once </span><span class="src-str">'HTML/Progress.php'</span><span class="src-sym">;</span></li>
<li>&nbsp;</li>
<li><span class="src-key">function </span><span class="src-id">myProgressHandler</span><span class="src-sym">(</span><span class="src-var">$progressValue</span><span class="src-sym">, </span><span class="src-sym">&amp;</span><span class="src-var">$bar</span><span class="src-sym">)</span></li>
<li><span class="src-sym">{</span></li>
<li>    <span class="src-key">static </span><span class="src-var">$c</span><span class="src-sym">;</span></li>
<li>    <span class="src-key">static </span><span class="src-var">$t</span><span class="src-sym">;</span></li>
<li>    </li>
<li>    <span class="src-key">if </span><span class="src-sym">(</span><span class="src-sym">!</span>isset<span class="src-sym">(</span><span class="src-var">$c</span><span class="src-sym">)) </span><span class="src-sym">{ </span></li>
<li>        <span class="src-var">$c </span>= <a href="http://www.php.net/time">time</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li>        <span class="src-var">$t </span>= <span class="src-num">0</span><span class="src-sym">;</span></li>
<li>    <span class="src-sym">}</span></li>
<li>&nbsp;</li>
<li>    <span class="src-comm">// wait a bit ... </span></li>
<li>    <span class="src-var">$bar</span><span class="src-sym">-&gt;</span><a href="http://www.php.net/sleep">sleep</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li>&nbsp;</li>
<li>    <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$bar</span><span class="src-sym">-&gt;</span><span class="src-id">isIndeterminate</span><span class="src-sym">(</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li>        <span class="src-var">$elapse </span>= <a href="http://www.php.net/time">time</a><span class="src-sym">(</span><span class="src-sym">) </span>- <span class="src-var">$c</span><span class="src-sym">;</span></li>
<li>&nbsp;</li>
<li>        <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$elapse </span>&gt; <span class="src-var">$t</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li>            echo <span class="src-str">&quot;</span><span class="src-str"><span class="src-id">myProgressHandler</span> -&gt; <span class="src-id">elapse</span> <span class="src-id">time</span> = <span class="src-var">$elapse</span> <span class="src-id">s</span>.&lt;<span class="src-id">br</span>/&gt;\n</span><span class="src-str">&quot;</span><span class="src-sym">;</span></li>
<li>            <span class="src-var">$t</span>++<span class="src-sym">;</span></li>
<li>        <span class="src-sym">}</span></li>
<li>        <span class="src-comm">/* rules to determine when switch back </span></li>
<li><span class="src-comm">           from indeterminate to determinate mode </span></li>
<li><span class="src-comm">         */</span></li>
<li>        <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$elapse </span>&gt;= <span class="src-num">12</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li>            <span class="src-var">$bar</span><span class="src-sym">-&gt;</span><span class="src-id">setIndeterminate</span><span class="src-sym">(</span><span class="src-id">false</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li>            <span class="src-var">$bar</span><span class="src-sym">-&gt;</span><span class="src-id">setValue</span><span class="src-sym">(</span><span class="src-num">0</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li>            <span class="src-var">$bar</span><span class="src-sym">-&gt;</span><span class="src-id">setString</span><span class="src-sym">(</span><span class="src-id">null</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li>            <span class="src-var">$bar</span><span class="src-sym">-&gt;</span><span class="src-id">setIncrement</span><span class="src-sym">(</span><span class="src-num">1</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li>        <span class="src-sym">}</span></li>
<li>    <span class="src-sym">}</span></li>
<li><span class="src-sym">}</span></li>
<li>&nbsp;</li>
<li><span class="src-var">$progress </span>= <span class="src-key">new </span><span class="src-id"><a href="../HTML_Progress/HTML_Progress.html">HTML_Progress</a></span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><span class="src-var">$progress</span><span class="src-sym">-&gt;</span><span class="src-id">setAnimSpeed</span><span class="src-sym">(</span><span class="src-num">200</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><span class="src-var">$progress</span><span class="src-sym">-&gt;</span><span class="src-id">setIncrement</span><span class="src-sym">(</span><span class="src-num">10</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><span class="src-var">$progress</span><span class="src-sym">-&gt;</span><span class="src-id">setStringPainted</span><span class="src-sym">(</span><span class="src-id">true</span><span class="src-sym">)</span><span class="src-sym">;  </span><span class="src-comm">// get space for the string</span></li>
<li><span class="src-var">$progress</span><span class="src-sym">-&gt;</span><span class="src-id">setString</span><span class="src-sym">(</span><span class="src-str">&quot;&quot;</span><span class="src-sym">)</span><span class="src-sym">;           </span><span class="src-comm">// but don't paint it</span></li>
<li><span class="src-var">$progress</span><span class="src-sym">-&gt;</span><span class="src-id">setIndeterminate</span><span class="src-sym">(</span><span class="src-id">true</span><span class="src-sym">)</span><span class="src-sym">;  </span><span class="src-comm">// Progress start in indeterminate mode</span></li>
<li><span class="src-var">$progress</span><span class="src-sym">-&gt;</span><span class="src-id">setProgressHandler</span><span class="src-sym">(</span><span class="src-str">'myProgressHandler'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li>&nbsp;</li>
<li><span class="src-var">$ui </span>= <span class="src-sym">&amp; </span><span class="src-var">$progress</span><span class="src-sym">-&gt;</span><span class="src-id">getUI</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><span class="src-var">$ui</span><span class="src-sym">-&gt;</span><a href="../HTML_Progress/Progress_UI/HTML_Progress_UI.html#methodsetProgressAttributes">setProgressAttributes</a><span class="src-sym">(</span><span class="src-str">'background-color = #e0e0e0'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><span class="src-var">$ui</span><span class="src-sym">-&gt;</span><a href="../HTML_Progress/Progress_UI/HTML_Progress_UI.html#methodsetStringAttributes">setStringAttributes</a><span class="src-sym">(</span><span class="src-key">array</span><span class="src-sym">(</span></li>
<li>    <span class="src-str">'color'  </span>=&gt; <span class="src-str">'#996'</span><span class="src-sym">,</span></li>
<li>    <span class="src-str">'background-color' </span>=&gt; <span class="src-str">'#CCCC99'</span></li>
<li><span class="src-sym">))</span><span class="src-sym">;        </span></li>
<li><span class="src-var">$ui</span><span class="src-sym">-&gt;</span><a href="../HTML_Progress/Progress_UI/HTML_Progress_UI.html#methodsetCellAttributes">setCellAttributes</a><span class="src-sym">(</span><span class="src-str">'active-color = #996'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><span class="src-php">?&gt;</span></li>
<li>&lt;html&gt;</li>
<li>&lt;head&gt;</li>
<li>&lt;title&gt;Basic Indeterminate Mode &lt;/title&gt;</li>
<li>&lt;style type=&quot;text/css&quot;&gt;</li>
<li>&lt;!--</li>
<li>body {</li>
<li>    background-color: #CCCC99;</li>
<li>    color: #996;</li>
<li>    font-family: Verdana, Arial;</li>
<li>}</li>
<li>&nbsp;</li>
<li><span class="src-php">&lt;?php </span>echo <span class="src-var">$progress</span><span class="src-sym">-&gt;</span><a href="../HTML_Progress/Progress_UI/HTML_Progress_UI.html#methodgetStyle">getStyle</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">; </span><span class="src-php">?&gt;</span></li>
<li>// --&gt;</li>
<li>&lt;/style&gt;</li>
<li>&lt;script type=&quot;text/javascript&quot;&gt;</li>
<li>&lt;!--</li>
<li><span class="src-php">&lt;?php </span>echo <span class="src-var">$progress</span><span class="src-sym">-&gt;</span><a href="../HTML_Progress/Progress_UI/HTML_Progress_UI.html#methodgetScript">getScript</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">; </span><span class="src-php">?&gt;</span></li>
<li>//--&gt;</li>
<li>&lt;/script&gt;</li>
<li>&lt;/head&gt;</li>
<li>&lt;body&gt;</li>
<li>&nbsp;</li>
<li><span class="src-php">&lt;?php </span></li>
<li>echo <span class="src-var">$progress</span><span class="src-sym">-&gt;</span><span class="src-id">toHtml</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">; </span></li>
<li>&nbsp;</li>
<li><span class="src-var">$progress</span><span class="src-sym">-&gt;</span><span class="src-id">run</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><span class="src-php">?&gt;</span></li>
<li>&nbsp;</li>
<li>&lt;/body&gt;</li>
<li>&lt;/html&gt;</li>
</ol></pre></div></p> 
  <p>Lets review this example step by step :</p>
  First, there is the user callback defined on <strong>lines 4 to 34</strong>, 
   and attached to the progress meter at <strong>line 42</strong>
   with <a href="../HTML_Progress/tutorial_progress.setprogresshandler.pkg.html">HTML_Progress::setProgressHandler</a> method.<br />
  Percent text information is hidden with value &quot;&quot; given to <a href="../HTML_Progress/tutorial_progress.setstring.pkg.html">HTML_Progress::setString</a> 
   method (<strong>line 40</strong>).
   And the determinate mode is activated on <strong>line 41</strong>.<br />
  <p>Lets have a look deeper into user-callback.</p>
  This example simulate a wait-process result for 12 seconds (<strong>lines 18 and 27</strong>). 
   Each new second, we display the elapse time (<strong>lines 20 to 23</strong>). When process
   will reach 12 seconds (line 27), we will switch back to determinate mode (<strong>line 28</strong>).
   The percent text information will be display again (<strong>line 30</strong>) 
   and we will start a new standard cycle, from 0 to 100 percent (<strong>lines 29 and 31</strong>).<br /></span>

 <span><a name="monitor-indeterminate"></a><h2 class="title">Using Indeterminate Mode with Progress Monitor</h2><p><p><table class="note"><tr><td><img src="../media/example.png"></td><td><img src = "../media/screenshots/indeterminate.png"/></td></tr></table></p>
   <p><table class="note"><tr><td class="note_img"><img src="../media/note.png"></td><td class="note_text">In example that follow, we will use a progress bar with help of monitoring functions v2, 
     so you should have HTML_Progress 1.1 or greater installed.</td></tr></table></p>
   Usage of indeterminate mode of progress meter with <i><b>HTML_Progress_Monitor</b></i>
    class is almost the same as in basic example above.<br /></p>
  <p><div class="listing"><pre><ol><li><span class="src-php">&lt;?php </span></li>
<li><span class="src-inc">require_once </span><span class="src-str">'HTML/Progress/monitor.php'</span><span class="src-sym">;</span></li>
<li>&nbsp;</li>
<li><span class="src-key">function </span><span class="src-id">myProgressHandler</span><span class="src-sym">(</span><span class="src-var">$progressValue</span><span class="src-sym">, </span><span class="src-sym">&amp;</span><span class="src-var">$obj</span><span class="src-sym">)</span></li>
<li><span class="src-sym">{</span></li>
<li>    <span class="src-key">static </span><span class="src-var">$c</span><span class="src-sym">;</span></li>
<li>    </li>
<li>    <span class="src-key">if </span><span class="src-sym">(</span><span class="src-sym">!</span>isset<span class="src-sym">(</span><span class="src-var">$c</span><span class="src-sym">)) </span><span class="src-sym">{ </span></li>
<li>        <span class="src-var">$c </span>= <span class="src-num">0</span><span class="src-sym">;</span></li>
<li>    <span class="src-sym">}</span></li>
<li>    <span class="src-var">$c </span>+= <span class="src-num">16</span><span class="src-sym">;</span></li>
<li>    <span class="src-var">$obj</span><span class="src-sym">-&gt;</span><span class="src-id">setCaption</span><span class="src-sym">(</span><span class="src-str">&quot;</span><span class="src-str"><span class="src-id">completed</span> <span class="src-var">$c</span> <span class="src-id">out</span> <span class="src-id">of</span> 400</span><span class="src-str">&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li>&nbsp;</li>
<li>    <span class="src-var">$bar </span>=<span class="src-sym">&amp; </span><span class="src-var">$obj</span><span class="src-sym">-&gt;</span><span class="src-id">getProgressElement</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li>    <span class="src-comm">/* rules to determine when switch back </span></li>
<li><span class="src-comm">       from indeterminate to determinate mode </span></li>
<li><span class="src-comm">     */</span></li>
<li>    <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$c </span>&gt;= <span class="src-num">240 </span>&amp;&amp; <span class="src-var">$bar</span><span class="src-sym">-&gt;</span><span class="src-id">isIndeterminate</span><span class="src-sym">(</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li>        <span class="src-var">$bar</span><span class="src-sym">-&gt;</span><span class="src-id">setIndeterminate</span><span class="src-sym">(</span><span class="src-id">false</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li>        <span class="src-var">$bar</span><span class="src-sym">-&gt;</span><span class="src-id">setString</span><span class="src-sym">(</span><span class="src-id">null</span><span class="src-sym">)</span><span class="src-sym">;   </span><span class="src-comm">// show percent-info</span></li>
<li>        <span class="src-var">$bar</span><span class="src-sym">-&gt;</span><span class="src-id">setValue</span><span class="src-sym">(</span><span class="src-num">0</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li>    <span class="src-sym">}</span></li>
<li>    <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$bar</span><span class="src-sym">-&gt;</span><span class="src-id">getPercentComplete</span><span class="src-sym">(</span><span class="src-sym">) </span>== <span class="src-num">1</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li>        <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$bar</span><span class="src-sym">-&gt;</span><span class="src-id">isIndeterminate</span><span class="src-sym">(</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li>            <span class="src-var">$bar</span><span class="src-sym">-&gt;</span><span class="src-id">setValue</span><span class="src-sym">(</span><span class="src-num">0</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li>        <span class="src-sym">} </span><span class="src-key">else </span><span class="src-sym">{</span></li>
<li>            <span class="src-var">$bar</span><span class="src-sym">-&gt;</span><span class="src-id">setString</span><span class="src-sym">(</span><span class="src-str">''</span><span class="src-sym">)</span><span class="src-sym">; </span><span class="src-comm">// hide percent-info</span></li>
<li>        <span class="src-sym">}</span></li>
<li>    <span class="src-sym">}</span></li>
<li><span class="src-sym">}</span></li>
<li>&nbsp;</li>
<li><span class="src-var">$monitor </span>= <span class="src-key">new </span><span class="src-id"><a href="../HTML_Progress/Progress_Observer/HTML_Progress_Monitor.html">HTML_Progress_Monitor</a></span><span class="src-sym">(</span><span class="src-str">'frmMonitor'</span><span class="src-sym">, </span></li>
<li>    <span class="src-key">array</span><span class="src-sym">( </span><span class="src-str">'button' </span>=&gt; <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'style' </span>=&gt; <span class="src-str">'width:80px;'</span><span class="src-sym">)</span><span class="src-sym">, </span></li>
<li>           <span class="src-str">'title'  </span>=&gt; <span class="src-str">'Progress ...' </span><span class="src-sym">)</span></li>
<li><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li>&nbsp;</li>
<li><span class="src-comm">// your custom user process goes here !</span></li>
<li><span class="src-var">$monitor</span><span class="src-sym">-&gt;</span><span class="src-id">setProgressHandler</span><span class="src-sym">(</span><span class="src-str">'myProgressHandler'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li>&nbsp;</li>
<li><span class="src-comm">// Attach a progress bar custom model</span></li>
<li><span class="src-var">$progress </span>= <span class="src-key">new </span><span class="src-id"><a href="../HTML_Progress/HTML_Progress.html">HTML_Progress</a></span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><span class="src-var">$ui </span>= <span class="src-sym">&amp; </span><span class="src-var">$progress</span><span class="src-sym">-&gt;</span><span class="src-id">getUI</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><span class="src-var">$ui</span><span class="src-sym">-&gt;</span><a href="../HTML_Progress/Progress_UI/HTML_Progress_UI.html#methodsetProgressAttributes">setProgressAttributes</a><span class="src-sym">(</span><span class="src-key">array</span><span class="src-sym">(</span></li>
<li>    <span class="src-str">'background-color' </span>=&gt; <span class="src-str">'#e0e0e0'</span></li>
<li><span class="src-sym">))</span><span class="src-sym">;        </span></li>
<li><span class="src-var">$ui</span><span class="src-sym">-&gt;</span><a href="../HTML_Progress/Progress_UI/HTML_Progress_UI.html#methodsetStringAttributes">setStringAttributes</a><span class="src-sym">(</span><span class="src-key">array</span><span class="src-sym">(</span></li>
<li>    <span class="src-str">'color'  </span>=&gt; <span class="src-str">'#996'</span><span class="src-sym">,</span></li>
<li>    <span class="src-str">'background-color' </span>=&gt; <span class="src-str">'#CCCC99'</span></li>
<li><span class="src-sym">))</span><span class="src-sym">;        </span></li>
<li><span class="src-var">$ui</span><span class="src-sym">-&gt;</span><a href="../HTML_Progress/Progress_UI/HTML_Progress_UI.html#methodsetCellAttributes">setCellAttributes</a><span class="src-sym">(</span><span class="src-key">array</span><span class="src-sym">(</span></li>
<li>    <span class="src-str">'active-color' </span>=&gt; <span class="src-str">'#996'</span></li>
<li><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li>&nbsp;</li>
<li><span class="src-var">$progress</span><span class="src-sym">-&gt;</span><span class="src-id">setAnimSpeed</span><span class="src-sym">(</span><span class="src-num">100</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><span class="src-var">$progress</span><span class="src-sym">-&gt;</span><span class="src-id">setIncrement</span><span class="src-sym">(</span><span class="src-num">10</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><span class="src-var">$progress</span><span class="src-sym">-&gt;</span><span class="src-id">setStringPainted</span><span class="src-sym">(</span><span class="src-id">true</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><span class="src-var">$progress</span><span class="src-sym">-&gt;</span><span class="src-id">setString</span><span class="src-sym">(</span><span class="src-str">&quot;&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><span class="src-var">$progress</span><span class="src-sym">-&gt;</span><span class="src-id">setIndeterminate</span><span class="src-sym">(</span><span class="src-id">true</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><span class="src-var">$monitor</span><span class="src-sym">-&gt;</span><span class="src-id">setProgressElement</span><span class="src-sym">(</span><span class="src-var">$progress</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><span class="src-php">?&gt;</span></li>
<li>&lt;html&gt;</li>
<li>&lt;head&gt;</li>
<li>&lt;title&gt;Indeterminate Mode Progress example&lt;/title&gt;</li>
<li>&lt;style type=&quot;text/css&quot;&gt;</li>
<li>&lt;!--</li>
<li>.progressStatus {</li>
<li>    color:#000000; </li>
<li>    font-size:10px;</li>
<li>}</li>
<li>&nbsp;</li>
<li>body {</li>
<li>    background-color: #444444;</li>
<li>    color: #EEEEEE;</li>
<li>    font-family: Verdana, Arial;</li>
<li>}</li>
<li>&nbsp;</li>
<li><span class="src-php">&lt;?php </span>echo <span class="src-var">$monitor</span><span class="src-sym">-&gt;</span><a href="../HTML_Progress/Progress_UI/HTML_Progress_UI.html#methodgetStyle">getStyle</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">; </span><span class="src-php">?&gt;</span></li>
<li>// --&gt;</li>
<li>&lt;/style&gt;</li>
<li>&lt;script type=&quot;text/javascript&quot;&gt;</li>
<li>&lt;!--</li>
<li><span class="src-php">&lt;?php </span>echo <span class="src-var">$monitor</span><span class="src-sym">-&gt;</span><a href="../HTML_Progress/Progress_UI/HTML_Progress_UI.html#methodgetScript">getScript</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">; </span><span class="src-php">?&gt;</span></li>
<li>//--&gt;</li>
<li>&lt;/script&gt;</li>
<li>&lt;/head&gt;</li>
<li>&lt;body&gt;</li>
<li>&nbsp;</li>
<li><span class="src-php">&lt;?php </span></li>
<li><span class="src-var">$renderer </span>=<span class="src-sym">&amp; </span><span class="src-id">HTML_QuickForm</span><span class="src-sym">::</span><span class="src-id">defaultRenderer</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><span class="src-var">$renderer</span><span class="src-sym">-&gt;</span><span class="src-id">setFormTemplate</span><span class="src-sym">(</span><span class="src-str">'</span></li>
<li><span class="src-str">    &lt;table width=&quot;450&quot; border=&quot;0&quot; cellpadding=&quot;3&quot; cellspacing=&quot;2&quot; bgcolor=&quot;#CCCC99&quot;&gt;</span></li>
<li><span class="src-str">    &lt;form{attributes}&gt;{content}</span></li>
<li><span class="src-str">    &lt;/form&gt;</span></li>
<li><span class="src-str">    &lt;/table&gt;</span></li>
<li><span class="src-str">'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><span class="src-var">$renderer</span><span class="src-sym">-&gt;</span><span class="src-id">setHeaderTemplate</span><span class="src-sym">(</span><span class="src-str">'</span></li>
<li><span class="src-str">    &lt;tr&gt;</span></li>
<li><span class="src-str">    &lt;td style=&quot;white-space:nowrap;background:#996;color:#ffc;&quot; align=&quot;left&quot; colspan=&quot;2&quot;&gt;</span></li>
<li><span class="src-str">        &lt;b&gt;{header}&lt;/b&gt;</span></li>
<li><span class="src-str">    &lt;/td&gt;</span></li>
<li><span class="src-str">    &lt;/tr&gt;</span></li>
<li><span class="src-str">'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><span class="src-var">$monitor</span><span class="src-sym">-&gt;</span><span class="src-id">accept</span><span class="src-sym">(</span><span class="src-var">$renderer</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li>&nbsp;</li>
<li><span class="src-comm">// Display progress monitor dialog box</span></li>
<li>echo <span class="src-var">$renderer</span><span class="src-sym">-&gt;</span><span class="src-id">toHtml</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li>&nbsp;</li>
<li>&nbsp;</li>
<li><span class="src-var">$monitor</span><span class="src-sym">-&gt;</span><span class="src-id">run</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;   </span></li>
<li><span class="src-php">?&gt;</span></li>
<li>&nbsp;</li>
<li>&lt;/body&gt;</li>
<li>&lt;/html&gt;</li>
</ol></pre></div></p> 
  <p>Differences with basic concept resides into <strong>QF renders</strong> defined on lines
   89 to 102, and attached to the monitor at line 103. 
   And also the progress meter is linked to the monitor on line 59.</p></span></div>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="33%" align="left" valign="top"><a href="../HTML_Progress/tutorial_part2-errorhandling.pkg.html">Prev</a></td>
<td width="34%" align="center" valign="top"><a href=
"../HTML_Progress/tutorial_part2-gettingstarted.pkg.html">Up</a></td>
<td width="33%" align="right" valign="top"><a href=
"../HTML_Progress/tutorial_part2-observer.pkg.html">Next</a></td>
</tr>

<tr>
<td width="33%" align="left" valign="top">Advanced Error Handling</td>
<td width="34%" align="center" valign="top">Getting Started</td>
<td width="33%" align="right" valign="top">Observer pattern</td>
</tr>
</table>
        <div class="credit">
		    <hr />
		    Documentation generated on Sun, 12 Sep 2004 20:22:48 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.3.0RC3</a>
	      </div>
      </td></tr></table>
    </td>
  </tr>
</table>

</body>
</html>